package com.yfp.device.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yfp.device.domain.OrderDetail;
import com.yfp.device.mapper.OrderDetailMapper;
import com.yfp.device.service.OrderDetailService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author admin
 * @description 针对表【order_detail】的数据库操作Service实现
 * @createDate 2024-06-18 11:57:05
 */
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper, OrderDetail> implements OrderDetailService {

    @Resource
    private OrderDetailMapper orderDetailMapper;


    @Override
    public void batchUpdate(List<OrderDetail> orderDetails) {
        orderDetailMapper.batchUpdate(orderDetails);
    }

    @Override
    public List<OrderDetail> findByDetailIds(List<String> orderDetailIds) {
        return orderDetailMapper.findByDetailIds(orderDetailIds);
    }

    @Override
    public void updateDetails(ArrayList<OrderDetail> ods) {
        orderDetailMapper.updateDetails(ods);
    }

    @Override
    public void updateOrderDetail(OrderDetail orderDetail) {

    }

    @Override
    public List<OrderDetail> getByOrderId(String orderId) {
        return orderDetailMapper.getByOrderId(orderId);
    }

    @Override
    public void updateOrderDetail(List<OrderDetail> detailList) {
        orderDetailMapper.updateOrderDetail(detailList);
    }

    /**
     * 根据订单号赋值排队时间
     * @param orderId
     */
    @Override
    public void awaitQueueTime(String orderId) {
        orderDetailMapper.awaitQueueTime(orderId);
    }
}




